package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.ShopcarMapper;
import chuishop.yiqimaicai.pojo.Shopcar;
import chuishop.yiqimaicai.service.ShopcarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopcarServiceImpl implements ShopcarService {

    @Autowired
    private ShopcarMapper shopcarMapper;

    @Override
    public List<Shopcar> selectShopcarByUid(Integer uid) {
        return shopcarMapper.selectShopcarByUid(uid);
    }

    @Override
    public boolean delShopcar(String[] ids) {
        return shopcarMapper.delShopcar(ids)>0;
    }

    @Override
    public boolean addShopcar(Shopcar shopcar) {
        return shopcarMapper.addShopcar(shopcar)>0;
    }

    @Override
    public boolean updateShopcar(Shopcar shopcar) {
        return shopcarMapper.updateShopcar(shopcar)>0;
    }
}
